/*    */ package com.gillion.grule.client.logger;
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ public class LoggerAppenderHolder
/*    */ {
/* 10 */   private static final ThreadLocal<LoggerAppender> LOGGER_APPENDERS = new ThreadLocal<>();
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   public static void save(LoggerAppender loggerAppender) {
/* 17 */     LOGGER_APPENDERS.set(loggerAppender);
/*    */   }
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   public static LoggerAppender get() {
/* 25 */     if (LOGGER_APPENDERS.get() == null) {
/* 26 */       LOGGER_APPENDERS.set(new LoggerAppender());
/*    */     }
/* 28 */     return LOGGER_APPENDERS.get();
/*    */   }
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */ 
/*    */   
/*    */   public static void log(String message, Object... args) {
/* 37 */     if (LOGGER_APPENDERS.get() == null) {
/* 38 */       LOGGER_APPENDERS.set(new LoggerAppender());
/*    */     }
/* 40 */     ((LoggerAppender)LOGGER_APPENDERS.get()).append(message, args);
/*    */   }
/*    */   
/*    */   public static void remove() {
/* 44 */     LOGGER_APPENDERS.remove();
/*    */   }
/*    */ }


/* Location:              D:\apache-tomcat-9.0.76\webapps\grule-manager\WEB-INF\lib\grule-client-2.0.2.RELEASE.jar!\com\gillion\grule\client\logger\LoggerAppenderHolder.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */